In the field of control system with a numerical control (NC) unit, a programmable controller (PC), or other various types of control unit, a distributed type remote I/O unit control system, in which a plurality of distributed type remote I/O units each for sending and receiving data to and from a basic system of the control unit are provided separately and bidirectional data communication is executed between the basic system of the control unit and the distributed type remote I/O units through a serial communication system, has been well known.
FIG. 31 shows a case where the conventional type of distributed type remote I/O control system is applied in an NC unit. In this figure, the distributed type remote I/O numerical control system has a basic system of the NC unit 1, and a plurality of distributed type remote I/O units 2 each provided separately from the basic system of the NC unit 1, and the basic system of the NC unit 1 and each of the distributed type remote I/O units 2 are connected to each other with two transmission signal lines 121, 122 in the form of serial communication system, and bidirectional data communications is executed between the basic system of the NC unit 1 and each distributed type remote I/O unit 2.
Of the transmission signal lines 121 and 122 which are in parallel to each other, the transmission signal line 121 is used for data transmission from the basic system of the NC unit 1 to the distributed type remote I/O unit 2, while the other transmission signal line 122 is used for data transmission from the distributed type remote I/O unit 2 to the basic system of the NC unit 1. It should be noted that a terminal module 4 is connected to the final distributed type remote I/O unit 2.
The basic system of the NC unit 1 comprises an MPU 101, a communication control section 102 having a transmission driver IC and a receiving driver IC, and a memory 103 for storing therein a control program, data, and the like, and a display unit 3 such as a CRT is connected thereto.
Each of the distributed type remote I/O units 2 comprises an MPU 111, a communication control section 112 having a transmission driver IC and a receiving driver IC, a memory 113 with a control program or the like stored therein, a switch 114 for determining an operating state of each distributed type remote I/O unit 2 discretely, an output I/F section 115 for a mechanical device (equipment to be controlled) not shown herein, and an input I/F section 116.
In the conventional type of distributed type remote I/O numerical control system as described above, the basic system of the NC unit 1 and the distributed type remote I/O units 2 are connected to each other in the form of serial communication system, and the distributed type remote I/O unit 2 is put under software control by the MPU 111 like the basic system of the NC unit 1, and different communication lines are provided for transmission and receiving for the basic system of the NC unit 1 and the distributed type remote I/O unit 2 respectively.
FIG. 32 shows another example of the conventional technology in which the distributed type remote I/O control system is applied to an NC unit. In this distributed type remote I/O numerical control system, the basic system of the NC unit 1 and the distributed type remote I/O unit 2 are connected with one signal line 123 in the form of serial communication system, and bidirectional data communication between the basic system of the NC unit 1 and each distributed type remote I/O unit 2 is executed through the one signal line 123.
This distributed type remote I/O numerical control system has substantially the same configuration as that of the distributed type remote I/O numerical control unit shown in FIG. 31 excluding the point that the signal line 123 is used for both data transmission from the basic system of the NC unit 1 to the distributed type remote I/O unit 2 and data transmission from the distributed type remote I/O unit 2 to the basic system of the NC control unit 1.
Description is made hereinafter for a software processing flow by the MPU 101 in the basic system of the NC unit 1 in the distributed type remote I/O numerical control system as described above with reference to FIG. 33. When operation of the system is started up, as the MPU 101 in the basic system of the NC unit 1 has not checked what type of distributed type remote I/O unit 2 is connected to the basic system of the NC unit 1, at first the MPU 101 generates a transmission frame for status request to each distributed type remote I/O unit 2 (step S1), and sends the status request frame to each distributed type remote I/O unit 2 (step S2).
As a response indicating reception of a status request frame by each distributed type remote I/O unit 2, the distributed type remote I/O unit 2 sends a frame (status data frame) including status data (step S3), and the basic system of the NC unit 1 receiving the frame stores the received status data therein. Then, a status request is repeated successively to other distributed type remote I/O units 2, and when the status data frames have been received from all the distributed type remote I/O units (step S4 affirmative), then connection state of each distributed type remote I/O unit 2 is analyzed from the status data, and a result of analysis is displayed on the display unit 3 in the basic system of the NC unit 1 (step S5).
Then the MPU 101 in the basic system of the NC unit 1 switches the operating mode to the on-line communication mode, generates on-line transmission frames each including data outputted by the distributed type remote I/O unit 2 (step 6), successively transmits the on-line transmission frame to the distributed type remote I/O units 2 (step S7), receives frames each including ordinary input data (on-line receiving frame) from the distributed type remote I/O units 2 (step 8), and executes each analysis of receiving state (whether receiving is complete or not, and whether any error is included in the received data or not) as well as of received data (step 39). Then, the operating sequence from step S6 to step S9 is repeated.
Next description is made for a software processing flow by the MPU 111 in the distributed type remote I/O unit 2 in the distributed type remote I/O numerical control system as described above.
Upon power turn ON, the MPU 111 in the distributed type remote I/O unit 2 executes a control program stored in the memory 113 to initialize operation of the communication control section 113 and read switch status data, recognizes how the unit 2 itself stands in a group of the distributed type I/O units 2 installed in the control system (step S21), and then enters the waiting state for receiving a transmission frame transmitted from the basic system of the NC control unit 1 to the distributed type remote I/O unit 2 (step S22). When the distributed type I/O units 2 receives a transmission frame transmitted thereto from the basic system of the NC unit 1 (step S22 affirmative), the MPU 111 determines whether the frame is in the off-line communication mode or the on-line communication mode from the header pattern (step S23).
In the off-line communication mode, namely if a status data request frame has been received, status data for the distributed type remote I/O unit is read to generate a transmission frame including status data for the unit, namely an off-line transmission frame (status data frame) (step S24), the transmission driver IC of the communication control section 112 is enabled according to an instruction from the MPU 111 (step S25), an off-line transmission frame is transmitted to the basic system of the NC unit 1 (step S26), and after transmission the transmission diver IC in the communication control section 112 is disabled (step S27). Then the operating state of the unit again returns to the receiving waiting (step S22).
In contrast, in the on-line communication mode, an on-line transmission frame incorporating therein input data fetched from the input I/F section 116 is generated (step S28), the transmission driver IC in the communication control section 112 is enabled according to an instruction from the MPU 111 (step S29), an off-line transmission frame is transmitted to the basic system of the NC unit 1 (step S30), and after transmission the transmission driver IC in the communication control section 112 is disabled (step S31).
Also determination is made as to whether the on-line transmission frame from the basic system of the NC unit 1 includes a CRC error or not (step S32), and if any CRC error is not included, an output signal is set to output the data included in the on-line transmission frame to the output I/F section 115 (step S33). When transmission is complete, the operating state returns again to the receiving waiting state (step S22), and then if a frame to the unit is received from the basic system of the NC unit 1, the above-described operating sequence is repeated.
In the conventional type of numerical control system as shown in FIG. 31, in spite of the fact that the communication system is of half duplex type, bidirectional communications between the basic system of the NC unit 1 and the distributed type remote I/O unit 2 is executed through two signal lines parallel to each other; the transmission signal line 121 dedicated to transmission from the basic system of the NC unit 1 to the distributed type remote I/O unit 2 and the transmission signal line 122 dedicated to transmission from the distributed type remote I/O unit 2 to the basic system of the NC unit 1, and for this reason there are many signal lines in the system, a large packaging space is required for connectors for connection of the signal lines in the basic system of the NC unit 1 as well as in the distributed type remote I/O unit 2, and also reliability against such troubles as breaking of wire or separation of connectors becomes disadvantageously low.
In contrast, in the conventional type of numerical control system as shown in FIG. 32, data communication is executed bidirectionally through one signal line 123 between the basic system of the NC unit 1 and the distributed type remote I/O unit 2, so that a number of signal lines is reduced and the reliability is higher as compared to that as shown in FIG. 31, but in either case of the numerical control system based on the conventional technology, a time required for analysis of received data included in a received frame, generation or transmission of a transmission frame varies case by case in the MPU 101 of the basic system of the NC unit 1 by executing a task other than data communication with the distributed type remote I/O unit 2, but as soon as a transmission frame is generated, transmission of the transmission frame is started between the basic system of the NC unit 1 and the distributed type remote I/O units 2, so that a cycle time for transmission and receiving to and from each of the distributed type remote I/O units 2 and also a cycle time for transmission and receiving of transmission frames for all the distributed type remote I/O units vary, which makes it impossible to execute cyclic communications within a prespecified period of time.
Also in the conventional type of control systems, in the distributed type remote I/O unit 2, a system function for cyclically executing transaction of data with the basic system of the NC unit 1 is realized with software control by the MPU 111 executing a control program, so that the hardware cost becomes expensive and also development of software for controlling the MPU 111 is required, thus also cost for software development being necessitated. For this reason, the distributed type remote I/O unit 2 becomes expensive.
Also the system function of the distributed type remote I/O unit 2 is realized with software control by the MPU 111, the communication data format becomes complicated, and if a plurality of equipment each having a different function are connected to the distributed type remote I/O unit 2 through one signal line (communication line), the MPU 111 must be added also to the distributed type remote I/O unit 2 for equipment treating only a small quantity of data, which is disadvantageous for cost performance.
Also in a system cyclically executing transaction of data between the basic system of the NC unit 1 and the distributed type remote I/O unit 2, when large data is transferred dividing the transmission time into several unit periods, if it is tried to read received data at a timing delayed from that as required by the transfer cycle, continuity of data can not be insured, which is disadvantageous.
Also in the conventional type of system, although the distributed type remote I/O unit 2 repeats input/output of data during normal operation, it is required for the MPU 111 to check for any error in a transmission frame from the basic system of the NC unit 1, output an operational instruction to an output control section, receive data inputted from an external device, and execute incorporation of the received transmission frame into a transmission frame, and for this reason work load to the MPU 111 is large, so that the MPU 111 is required to have a high performance and the cost becomes more expensive.
Also in the conventional system as described above, if any fault occurs, the basic system of the NC unit 1 transmits a transmission frame for resetting output from the distributed type remote I/O unit 2 to the distributed type remote I/O unit 2, but if an accidental error should occur, a transmission processing time required for resetting output becomes short, and the output resetting can not be executed, or output resetting can not be carried out due to such cable troubles as disconnection of cable connectors or breaking of signal line, and for this reason another resetting means is required.